home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / adikit.arc / COLORS.LSP < prev    next >
Encoding:
Lisp/Scheme  |  1986-12-01  |  4.3 KB  |  135 lines

  1.  
  2.  
  3. (dssetup)
  4. (print "                                ")
  5. (print "* * * COLOR handling tests * * *")
  6. (print "                                ")
  7.  
  8. ; open test result output file...name NNNdisp.lay
  9. (setq testfn (strcat disp8 ".clr"))
  10. (startestout testfn)
  11. (terpri)
  12. (print "When the command prompt is only one line or is configured OFF,")
  13. (print "test questions will be asked from the TEXT screen.")
  14. (print "So, if you need to look at the graphics screen again, ")
  15. (print "or the text screen, use flipscreen BEFORE answering the question")
  16. (terpri)
  17. (print "Yes/No questions must be answered with 'y' 'Y' 'n' or 'N'")
  18. (print "Any other response will result in the prompt being repeated")
  19. (terpri)
  20. (print "When a prompt says Hit RETURN, you can only continue by")
  21. (print "depressing the RETURN key")
  22. (terpri)
  23. (print "* * Hit RETURN when ready to go * *")
  24. (getstring cr)
  25.  
  26. ; the first test should check that config of status, comnd and menu worked
  27.  
  28.  
  29. ; some tests specifically for color...
  30.  
  31. (starttest "We will now insert CHROMA to check the 256 COLORS")
  32. (command "insert"  "chroma" "0,0" "1" "1" "0")
  33. (command)
  34. (command "zoom" "e")
  35. (getrslt "Did ALL 256 COLORS show up properly? ")
  36.  
  37. ; check highlighting w erase
  38. (starttest "Now we'll HIGHLIGHT everything")    
  39. (command "erase" "w" (getvar "extmin") (getvar "extmax") (slowpick))
  40. (command)
  41. (getrslt "Did ALL the COLORS HIGHLIGHT correctly? ")
  42.  
  43. ; check erase
  44. (starttest "Now we'll ERASE ALL the colors")
  45. (command "erase"  "w" (getvar "extmin") (getvar "extmax")  "")
  46. (getrslt "Did ALL the COLORS ERASE correctly? (i.e. is the dwg area blank)")
  47.  
  48. ; check oops
  49. (starttest "Make sure OOPS re-creates ALL COLORS correctly")
  50. (command "oops")
  51. (getrslt "Did ALL the COLORS come back (OOPS) properly? ")
  52.  
  53. ; check flip screens after status command
  54. (starttest "Check for correct COLORS after STATUS, GRAPHSCR")
  55. (command "status")
  56. (graphscr)
  57. (wait 1000)
  58. (getrslt "Are ALL COLORS correct after STATUS, GRAPHSCR? ")
  59.  
  60. ; check SHELL and colors 
  61. (starttest "Check for correct COLORS after SHELL")
  62. (command "SHELL" "DIR *.")
  63. (graphscr)
  64. (wait 1000)
  65. (getrslt "Are ALL COLORS correct after SHELL? ")
  66.  
  67. ; get rid of all those colors....and zoom a
  68. (command "erase" "l" "")
  69. (command "zoom" "a")
  70.  
  71. ; check axis ticks not drawn in last color
  72. ; have tester input a supported color
  73. (starttest "Check that AXIS ticks are NOT LAST COLOR")
  74. ;change layer 0 color 
  75. (setq x 0)
  76. (while (= 0 x)
  77.        (setq x (getint "Enter a color # (other than 0): ")) 
  78.        (if (null x) (setq x 0)))
  79. (command "layer" "color")
  80. (command x "0" "")
  81. (command)
  82. ;draw something then turn axis on
  83. (graphwait)
  84. (command "line" (getvar "viewctr") "@2<0" "")
  85. (command "axis" "on")
  86. (command "erase" "l" "")
  87. (getrslt "Did the AXIS ticks draw in the PROPER COLOR? (NOT LAST COLOR)")
  88.  
  89. ; check xhair colors?
  90. (starttest "Check that CROSS-HAIRS are NOT LAST COLOR")
  91. (command "line" (getvar "viewctr") "@2<0" "")
  92. (graphwait)
  93. (command "erase" "l" "")
  94. (wait 1000)
  95. (getrslt "Are the CROSS-HAIRS the correct COLOR (NOT LAST COLOR)? ")
  96.  
  97. ; check grid dots not drawn in last color
  98. (starttest "Check that GRID dots are NOT LAST COLOR")
  99. (command "line" (getvar "viewctr") "@2<0" "")
  100. (wait 250)
  101. (command "grid" "on")
  102. (command "erase" "l" "")
  103. (getrslt "Did the GRID dots draw in the PROPER COLOR? (NOT LAST COLOR)")
  104.  
  105.  
  106. ; check drawing something in the background color
  107. ; is this needed...as all 256 colors are drawn w insert chroma?
  108.  
  109. (starttest "Now we'll DRAW using the BACKGROUND COLOR")
  110.  
  111. ;define layer 0 color as background color - and set it
  112. (setq x 0)
  113. (while (= 0 x)
  114.        (setq x (getint "Enter a color # (other than 0): "))
  115.        (if (null x) (setq x 0)))
  116. (command "layer" "color")
  117. (command x "0" "")
  118.  
  119. ; now draw something fairly large with it - wide pline half height of screen
  120. (setq w (/ (getvar "viewsize")  2) )
  121. (command "pline" (getvar "viewctr") "w" w w "@2<0" "")
  122. (getrslt "Did a wide pline appear in a COLOR other than the BACKGROUND COLOR? ")
  123.                 
  124. ;make sure highlighting and erase work ok
  125. (starttest "Now make sure this PLINE HIGHLIGHTS and ERASE properly")
  126. (command "erase" "l" (slowpick)  "")
  127. (getrslt "Did the PLINE HIGHLIGHT and ERASE properly? ")
  128.  
  129.  
  130.  
  131. (write-line (rtos (getvar "cdate") 2) testf)
  132. (write-line (strcat "end " disp) testf)
  133. (setq testf (close testf))
  134. (print "* * * END * * *")        
  135.